package com.yueya.config;

import com.jfinal.plugin.activerecord.ActiveRecordPlugin;
import com.yueya.basic.dept.model.Dept;
import com.yueya.basic.dept.model.DeptBase;
import com.yueya.basic.dept.model.DeptUser;
import com.yueya.basic.dict.model.Dict;
import com.yueya.basic.feedback.model.Feedback;
import com.yueya.basic.menu.Menu;
import com.yueya.basic.news.content.model.Content;
import com.yueya.basic.news.content.model.ContentCollect;
import com.yueya.basic.news.content.model.ContentText;
import com.yueya.basic.news.content.model.ContentZan;
import com.yueya.basic.news.subject.model.Subject;
import com.yueya.basic.notice.model.Notice;
import com.yueya.basic.notice.model.NoticeDept;
import com.yueya.basic.notice.model.NoticeStatus;
import com.yueya.basic.notice.model.NoticeUser;
import com.yueya.basic.role.model.Role;
import com.yueya.basic.role.model.RoleMenu;
import com.yueya.basic.role.model.RoleUser;
import com.yueya.basic.token.model.Token;
import com.yueya.basic.user.model.User;
import com.yueya.basic.user.model.UserBase;
import com.yueya.business.assess.model.Assess;
import com.yueya.business.assess.model.AssessContent;
import com.yueya.business.assess.model.SeniorHealth;
import com.yueya.business.assess.model.SeniorIllness;
import com.yueya.business.bed.model.Bed;
import com.yueya.business.bed.model.Floor;
import com.yueya.business.bed.model.House;
import com.yueya.business.bed.model.Room;
import com.yueya.business.comment.model.Comment;
import com.yueya.business.donate.Donate;
import com.yueya.business.knowledge.model.Knowledge;
import com.yueya.business.knowledge.model.KnowledgeCollect;
import com.yueya.business.knowledge.model.KnowledgeText;
import com.yueya.business.optlog.model.OptLog;
import com.yueya.business.qa.model.Qa;
import com.yueya.business.reservation.Reservation;
import com.yueya.business.senior.model.SeniorBase;
import com.yueya.business.senior.model.SeniorEgress;
import com.yueya.business.senior.model.SeniorExamination;
import com.yueya.business.senior.model.SeniorGuardian;
import com.yueya.business.stay.model.Stay;
import com.yueya.business.stay.model.StayLeave;

public class ORMapping {
	public static void config(ActiveRecordPlugin arp) {
		// basic
		arp.addMapping("t_user", "user_id", User.class);
		arp.addMapping("t_user_base", "user_base_id", UserBase.class);
		arp.addMapping("t_dept", "dept_id", Dept.class);
		arp.addMapping("t_dept_base", "dept_base_id", DeptBase.class);
		arp.addMapping("t_dept_user", "dept_user_id", DeptUser.class);
		arp.addMapping("t_dict", "dict_id", Dict.class);

		arp.addMapping("t_menu", "id", Menu.class);
		arp.addMapping("t_role", "id", Role.class);
		arp.addMapping("t_role_user", RoleUser.class);
		arp.addMapping("t_role_menu", RoleMenu.class);
		arp.addMapping("t_notice", "id", Notice.class);
		arp.addMapping("t_notice_status", "id", NoticeStatus.class);
		arp.addMapping("t_notice_dept", "id", NoticeDept.class);
		arp.addMapping("t_notice_user", "id", NoticeUser.class);
		arp.addMapping("t_feedback", "id", Feedback.class);

		arp.addMapping("t_subject", "subject_id", Subject.class);
		arp.addMapping("t_content", "content_id", Content.class);
		arp.addMapping("t_content_text", "content_text_id", ContentText.class);
		arp.addMapping("t_content_zan", "content_zan_id", ContentZan.class);
		arp.addMapping("t_content_collect", "content_collect_id", ContentCollect.class);
		arp.addMapping("t_comment", "comment_id", Comment.class);

		// business
		arp.addMapping("t_qa", Qa.class);
		arp.addMapping("t_opt_log", OptLog.class);
		arp.addMapping("t_token", Token.class);
		
		arp.addMapping("jg_bed","bed_id", Bed.class);
		arp.addMapping("jg_room","room_id", Room.class);
		arp.addMapping("jg_floor","floor_id", Floor.class);
		arp.addMapping("jg_house", "house_id",House.class);
		
		arp.addMapping("jg_knowledge", "knowledge_id",Knowledge.class);
		arp.addMapping("jg_knowledge_text", "knowledge_text_id",KnowledgeText.class);
		arp.addMapping("jg_knowledge_collect", "knowledge_collect_id",KnowledgeCollect.class);
		
		arp.addMapping("jg_senior_base", "senior_id",SeniorBase.class);
		arp.addMapping("jg_senior_guardian", "guardian_id",SeniorGuardian.class);
		arp.addMapping("jg_senior_examination", "examination_id",SeniorExamination.class);
		arp.addMapping("jg_senior_egress", "egress_id",SeniorEgress.class);
		
		arp.addMapping("jg_assess_base", "access_id",Assess.class);
		arp.addMapping("jg_assess_content", "assess_content_id",AssessContent.class);
		arp.addMapping("jg_senior_illness", "illness_id",SeniorIllness.class);
		arp.addMapping("jg_senior_health", "senior_health_id",SeniorHealth.class);
		
		arp.addMapping("jg_stay", "stay_id",Stay.class);
		arp.addMapping("jg_stay_leave", "stay_leave_id",StayLeave.class);
		
		arp.addMapping("jg_donate", "donate_id",Donate.class);
		arp.addMapping("jg_reservation", "reservation_id",Reservation.class);
	}
}